#ifndef __DOCKELEMENT__
#define __DOCKELEMENT__

#include "../includes/includes.h"

#include <vector>

	enum ElementType {
			root,
			container,
			separator,
			fileHandler,
			custom,
			single
	};

class DockElement
{
public:
	DockElement(const ElementType& type_);
	DockElement(const ElementType& type_, DockElement * parent_);
	DockElement(const ElementType& type_, DockElement * parent_, std::vector<DockElement*> children_);

	virtual ~DockElement();

	static DockElement * DockElementFactoryPizzaFactory(String type_);

	const ElementType& getType();

	const String getImgURL();
	
	DockElement* getParent();
	
	std::vector<DockElement*>& getChildren();

	DockElement * getChild(const int& index);

	bool hasChildren();

	void setParent(DockElement * parent_);

	void addChild(DockElement * child);

	virtual void leftMouseButtonClick() = 0;
	virtual void rightMouseButtonDown() = 0;
	virtual Image * getImageToDraw();

	virtual String getTitle();


protected:

	virtual void needsDefaultImage();

	Image * elementImage;

	ElementType type;
	String title;
	String imageURL;

	DockElement * parent;
	std::vector<DockElement*> children;


};

#endif